Filename | (eval 1132)[/usr/share/perl/5.10/CGI.pm:869] |
Statements | Executed 24 statements in 56µs |
Eval Invoked At | /usr/share/perl/5.10/CGI.pm line 869 |
Sibling evals | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
4 | 2 | 2 | 52µs | 77µs | unescapeHTML | CGI::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # spent 77µs (52+25) within CGI::unescapeHTML which was called 4 times, avg 19µs/call:
# 3 times (38µs+19µs) by CGI::header at line 55 of (eval 1131)[CGI.pm:869], avg 19µs/call
# once (14µs+6µs) by CGI::header at line 832 of CGI.pm | ||||
2 | # hack to work around earlier hacks | ||||
3 | 4 | 2µs | push @_,$_[0] if @_==1 && $_[0] eq 'CGI'; | ||
4 | 4 | 12µs | 4 | 20µs | my ($self,$string) = CGI::self_or_default(@_); # spent 20µs making 4 calls to CGI::self_or_default, avg 5µs/call |
5 | 4 | 1µs | return undef unless defined($string); | ||
6 | 4 | 15µs | 4 | 2µs | my $latin = defined $self->{'.charset'} ? $self->{'.charset'} =~ /^(ISO-8859-1|WINDOWS-1252)$/i # spent 2µs making 4 calls to CGI::CORE:match, avg 550ns/call |
7 | : 1; | ||||
8 | # thanks to Randal Schwartz for the correct solution to this one | ||||
9 | 4 | 12µs | 4 | 3µs | $string=~ s[&(.*?);]{ # spent 3µs making 4 calls to CGI::CORE:subst, avg 725ns/call |
10 | local $_ = $1; | ||||
11 | /^amp$/i ? "&" : | ||||
12 | /^quot$/i ? '"' : | ||||
13 | /^gt$/i ? ">" : | ||||
14 | /^lt$/i ? "<" : | ||||
15 | /^#(\d+)$/ && $latin ? chr($1) : | ||||
16 | /^#x([0-9a-f]+)$/i && $latin ? chr(hex($1)) : | ||||
17 | $_ | ||||
18 | }gex; | ||||
19 | 4 | 14µs | return $string; | ||
20 | } | ||||
21 | |||||
22 | ; |